package com.johnny.data;

import java.util.List;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class PlayerInfo extends Info {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7380022653019433010L;

	private String id;
	private String name;
	private String email;
	private String password;
	private String level;
	private int empiricalValue;
	private long credits;
	private long cash;
	private boolean isVip;
	private byte[] image;
	private List<String> friends;
	private List<String> blackFriends;
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public int getEmpiricalValue() {
		return empiricalValue;
	}
	public void setEmpiricalValue(int empiricalValue) {
		this.empiricalValue = empiricalValue;
	}
	public long getCredits() {
		return credits;
	}
	public void setCredits(long credits) {
		this.credits = credits;
	}
	public long getCash() {
		return cash;
	}
	public void setCash(long cash) {
		this.cash = cash;
	}
	public boolean isVip() {
		return isVip;
	}
	public void setVip(boolean isVip) {
		this.isVip = isVip;
	}
	public byte[] getImage() {
		return image;
	}
	public void setImage(byte[] image) {
		this.image = image;
	}
	public List<String> getFriends() {
		return friends;
	}
	public void setFriends(List<String> friends) {
		this.friends = friends;
	}
	public List<String> getBlackFriends() {
		return blackFriends;
	}
	public void setBlackFriends(List<String> blackFriends) {
		this.blackFriends = blackFriends;
	}
	@Override
	public JSONObject toJsonObject() {
		JSONObject object=new JSONObject();
		object.put("id", id);
		object.put("name", name);
		object.put("email", email);
		object.put("level", level);
		object.put("empiricalValue", empiricalValue);
		object.put("credits", credits);
		object.put("cash", cash);
		object.put("isVip", isVip);
		object.put("image", image);
		object.put("friends", JSONArray.fromObject(friends));
		object.put("blackFriends", JSONArray.fromObject(blackFriends));
		return object;
	}
	
	
}
